#!/bin/sh

while true; do
    image="$(printf "%s\n" "$HOME/.local/share/backgrounds/"* | sort -R | head -n 1)"

    printf "%s\n" "preload = $image" "wallpaper = , $image" "ipc = false" \
        > "$HOME/.config/hypr/hyprpaper.conf"

    pkill hyprpaper
    hyprpaper &
    sleep 3600
done
